package com.zg.scf.domain.req;

import com.zg.common.core.validation.Mobile;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class ScfUserEditReq {

    @ApiModelProperty(value = "用户ID", required = true)
    @NotNull(message = "【用户ID】字段不能为NULL")
    private Long id;

    @ApiModelProperty(value = "类型", required = true)
    @NotBlank(message = "【类型】字段不能为NULL")
    private String type;

    @ApiModelProperty(value = "融资企业/金融机构ID")
    private Long companyId;

    @ApiModelProperty(value = "用户名", required = true)
    @NotBlank(message = "【用户名】字段不能为NULL")
    private String username;

    @ApiModelProperty(value = "手机号", required = true)
    @NotBlank(message = "【手机号】字段不能为NULL")
    @Mobile
    private String phone;

    @ApiModelProperty(value = "状态", required = true)
    @NotNull(message = "【状态】字段不能为NULL")
    private Boolean isOpen;

    @ApiModelProperty(value = "关联角色", required = true)
    @NotEmpty(message = "【关联角色】字段不能为NULL")
    private List<Long> roleIds;
}
